#ifndef __ODOM_H__
#define __ODOM_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

#define ODOM_HEADER 0xabcd
#define ODOM_INIT_CRC16 0xdcba

#pragma pack(1)
typedef struct
{
	uint16_t header : 16;
	int16_t px : 16;
	int16_t py : 16;
	int16_t pz : 16;
	int16_t vx : 16;
	int16_t vy : 16;
	int16_t vz : 16;
	uint16_t check_sum : 16;
}Odom;

#define ODOM_SIZE() sizeof(Odom)

	uint8_t Odom_Pop(Odom* odom, uint8_t* buf);

#ifdef __cplusplus
}
#endif

#endif

